package jrdcom.com.contentprovidertest;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

/**
 * Created by longcheng on 2017/1/7.
 */
public class myDataBaseHelper extends SQLiteOpenHelper {
    private static final  String CREATE_TABLE= "create table stu(" +
            "id integer primary key autoincrement," +
            "stu_name text)";
    public myDataBaseHelper(Context context, String name, SQLiteDatabase.CursorFactory factory, int version){
        super(context,name,factory,version);
    }
    @Override
    public void onCreate(SQLiteDatabase db) {
        db.execSQL(CREATE_TABLE);
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
        //修改版本号执行, 可以删除旧的表,创建新的表
    }
}
